package org.databasefacade.data;

import org.databasefacade.table.column.datatype.DataType;


/**
 * This record will be used to move data around
 * by the database facade. All data stored is this
 * record is assumed to come from a database column
 * so the column meta-data is expected by the record.
 * 
 * @author Daniel
 *
 */
public interface DataValue {
		
	/**
	 * Set the table name the data is associated
	 * too if it applies.
	 */
	public void setTableName(String tableName);
	
	/**
	 * Get the table name the data is associated
	 * too if it applies.
	 */
	public String getTableName();
	
	/**
	 * Set the column name the data is associated
	 * too if it applies.
	 */
	public void setColumnName(String tableName);
	
	/**
	 * Get the column name the data is associated
	 * too if it applies.
	 */
	public String getColumnName();
	
	/**
	 * Set the data type for the value of the data
	 * associated with the value.
	 */
	public void setDataType(DataType dataType);
	
	/**
	 * Get the data type for the value associated
	 * with the data.
	 */
	public DataType getDataType();
	
	/**
	 * Set rending information for the data value
	 * @param meta
	 */
	public void setRenderingMetaData(RenderingMetaData meta);
	
	/**
	 * Get rendering information for the data value
	 * @return
	 */
	public RenderingMetaData getRenderingMetaData();
    
    /**
     * Set the value of the data that is being
     *
     * stored in the record.
     * 
     * @param value
     */
	public void setDataValue(Object value);
	
	/**
	 * 
	 * Get the data that is being stored in the record.
	 * 
	 * @return
	 */
	public Object getDataValue();	
	
	/**
	 * Set the value in string form for the record.
	 * 
	 * @param value
	 */
	public void setDataStringValue(Object value);
	
	/**
	 * 
	 * Get the value in the string formatted form
	 * for the type of value that is being stored
	 * in the record.
	 * 
	 * @return
	 */
	public String getDataStringValue();
	
	/**
	 * 
	 * Make a copy of this record.
	 * 
	 * @param rec
	 * @return
	 */
	public DataValue getCopy(DataValue rec);
	
	/**
	 * Make a copy of this record but clear the
	 * values and only keep the meta-data.
	 * 
	 * @param rec
	 * @return
	 */
	public DataValue getCopyWithClearedValues(DataValue rec);
}
